/****************************************************************
 *
 *  Add some comments here
 * 
 * 
 * 
 * 
 ***************************************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace Wicresoft.OmsClient
{
    class ConfigSaver
    {
        public static void Save(string url, string user, string pwd, string cell, bool calendar, bool contact)
        {
            SyncConfigManage.ProviderUrl = url;
            SyncConfigManage.UserName = user;
            SyncConfigManage.Password = pwd;
            SyncConfigManage.Mobile = cell;
            if (SyncConfigManage.EnableCalendarSync.ToLower() != calendar.ToString().ToLower())
                if (calendar)
                    Logger.Info("Turn on calendar sync");
                else
                    Logger.Info("Turn off calendar sync");
            SyncConfigManage.EnableCalendarSync = calendar.ToString();
            if (SyncConfigManage.EnableContactSync.ToLower() != contact.ToString().ToLower())      
                if (contact)
                    Logger.Info("Turn on contact sync");
                else
                    Logger.Info("Turn off contact sync");
            SyncConfigManage.EnableContactSync = contact.ToString();
            
            
        }
    }
}
